﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class TaiKhoanBUS
    {
        public bool ktDangNhap(string tenDangNhap, string matKhau)
        {
            TaiKhoanDAO taikhoan = new TaiKhoanDAO();
            List<TaiKhoanDTO> tk = new List<TaiKhoanDTO>();
            tk = taikhoan.LayTaiKhoan();
            foreach(TaiKhoanDTO i in tk)
            {
                if (i.TenDangNhap == tenDangNhap && i.MatKhau == matKhau)
                    return true;
            }
            return false;
        }
    }
}
